package org.csu.mypetstoreplus.persistence;

import org.csu.mypetstoreplus.entity.Account;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface AccountDao extends JpaRepository<Account, Integer> {
    @Query(value = "select * from account where userid =?1 limit 1", nativeQuery = true)
    Account findByUsername(String username);
}
